<template>
  <div class="right-content">
    <common-form v-bind="formConfig" v-model="formData">
      <template v-slot:header> </template>
      <template v-slot:footer>
        <div class="other-info" v-if="currentPrecursor == 'SPG4'">
          <span>平均角速度一阶：{{ "undefined" }}</span>
          <span>平均角速度一阶：{{ "undefined" }}</span>
        </div>
      </template>
    </common-form>
  </div>
</template>
<script>
import CommonForm from "../../baseUi/form/CommonForm";
export default {
  components: {
    CommonForm,
  },
  props: {
    formConfig: {
      type: Object,
      required: true,
    },
    currentPrecursor: {
      type: String,
      default: "SPG4",
    },
  },
  mounted() {
    const formItem = this.formConfig?.formItem ?? [];
    for (let item of formItem) {
      this.originFormData[`${item.field}`] = "";
      this.formData = this.originFormData;
    }
  },
  data() {
    return {
      originFormData: {},
      formData: {},
    };
  },
  methods: {
    reset() {
      for (let item in this.originFormData) {
        this.formData[`${item}`] = "";
      }
    },
  },
};
</script>
<style scoped>
.click-btn {
  position: absolute;
  width: 100%;
  display: flex;
  justify-content: flex-end;
  bottom: 140px;
  right: 22px;
}
.other-info {
  margin-top: 10px;
  width: 50%;
  display: flex;
  font-size: 14px;
  justify-content: space-around;
}
.active {
  background-color: #00c3d9;
}
</style>
